package com.geek.factory.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.geek.factory.dto.DeviceRepairDTO;
import com.geek.factory.entity.DeviceRepair;
import com.geek.factory.mapper.DeviceRepairMapper;
import com.geek.factory.service.DeviceRepairService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DeviceRepairServiceImpl extends ServiceImpl<DeviceRepairMapper, DeviceRepair> implements DeviceRepairService {

    @Resource
    private DeviceRepairMapper deviceRepairMapper;

    @Override
    public List<DeviceRepairDTO> getAllWithLineName() {
        return deviceRepairMapper.selectAllWithLineName();
    }

    @Override
    public String getLineNameByProductLineId(Long productLineId) {
        return deviceRepairMapper.getLineNameById(productLineId);
    }


}
